<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<ul>
    <li>2019-8-5</li>
    <li>2019-8-5</li>
    <li>2019-8-5</li>
    <li>2019-8-5</li>
    <li>2019-8-5</li>
</ul>
<ol id="ol">
    <li>13:54</li>
    <li>13:54</li>
    <li>13:54</li>
    <li>13:54</li>
    <li>13:54</li>
</ol>
<script>
    //返回的是获取过来的元素对象的集合以伪数组的形式形成存储
    var lis = document.getElementsByTagName('li');
    for (var i = 0;i < lis.length;i++) {
        console.log(lis[i]);
    }
    var ol = document.getElementById('ol');
    console.log(ol.getElementsByTagName('li'));
</script>
</body>
</html>